fn is_prime(i: u64) -> bool {
    if i == 2 {
        return true;
    }
    if i == 1 || i % 2 == 0 {
        return false;
    }
    let mut j = 3;
    while j * j <= i {
        if i % j == 0 {
            return false;
        }
        j += 2;
    }
    true
}
pub fn goldbach_conjecture() -> u64 {
    let mut i = 1;
    let mut results = Vec::with_capacity(2);
    'i: loop {
        i += 2;
        if is_prime(i) {
            continue 'i;
        }
        let mut j = 1;
        while 2 * j * j < i {
            if is_prime(i - 2 * j * j) {
                continue 'i;
            }
            j += 1;
        }
        // eprintln!("{}", i);
        results.push(i);
        if results.len() == 2 {
            return results.iter().sum();
        }
    }
}
